# Contributor: fossdd <fossdd@pwned.life>
# Maintainer: team/gnome <fossdd@pwned.life>
pkgname=libspelling
pkgver=0.4.4
pkgrel=0
pkgdesc="Spellcheck library for GTK 4"
url="https://gitlab.gnome.org/GNOME/libspelling"
arch="all"
license="LGPL-2.1-or-later"
makedepends="
	enchant2-dev
	gi-docgen
	glib-dev
	gobject-introspection-dev
	gtk4.0-dev
	gtksourceview5-dev
	meson
	vala
	"
checkdepends="enchant2-data"
subpackages="$pkgname-doc $pkgname-dev $pkgname-lang"
source="https://download.gnome.org/sources/libspelling/${pkgver%.*}/libspelling-$pkgver.tar.xz"
options="!check" # tests fail

build() {
	abuild-meson \
		-Db_lto=true \
		-Dsysprof=false \
		. output
	meson compile -C output
}

check() {
	meson test --no-rebuild --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
78119a626e9e135aff4038a890ec073c91bfa795cd54450e4fd4164d92fae5ba33031e13c6ffc6f97764f6b5bc950a4b7e02b2013f38b74343c84500e5179db4  libspelling-0.4.4.tar.xz
"
